package com.ruoyi.gis.service.impl;

import java.util.List;

import cn.hutool.core.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gis.mapper.DatasetTypeBandMapper;
import com.ruoyi.gis.domain.DatasetTypeBand;
import com.ruoyi.gis.service.IDatasetTypeBandService;

/**
 * datasetbandService业务层处理
 *
 * @author rww
 * @date 2024-08-26
 */
@Service
public class DatasetTypeBandServiceImpl implements IDatasetTypeBandService
{
    @Autowired
    private DatasetTypeBandMapper datasetTypeBandMapper;

    /**
     * 查询datasetband
     *
     * @param id datasetband主键
     * @return datasetband
     */
    @Override
    public DatasetTypeBand selectDatasetTypeBandById(String id)
    {
        return datasetTypeBandMapper.selectDatasetTypeBandById(id);
    }

    /**
     * 查询datasetband列表
     *
     * @param datasetTypeBand datasetband
     * @return datasetband
     */
    @Override
    public List<DatasetTypeBand> selectDatasetTypeBandList(DatasetTypeBand datasetTypeBand)
    {
        return datasetTypeBandMapper.selectDatasetTypeBandList(datasetTypeBand);
    }

    /**
     * 新增datasetband
     *
     * @param datasetTypeBand datasetband
     * @return 结果
     */
    @Override
    public int insertDatasetTypeBand(DatasetTypeBand datasetTypeBand)
    {
        datasetTypeBand.setId(IdUtil.getSnowflakeNextIdStr());
        return datasetTypeBandMapper.insertDatasetTypeBand(datasetTypeBand);
    }

    /**
     * 修改datasetband
     *
     * @param datasetTypeBand datasetband
     * @return 结果
     */
    @Override
    public int updateDatasetTypeBand(DatasetTypeBand datasetTypeBand)
    {
        return datasetTypeBandMapper.updateDatasetTypeBand(datasetTypeBand);
    }

    /**
     * 批量删除datasetband
     *
     * @param ids 需要删除的datasetband主键
     * @return 结果
     */
    @Override
    public int deleteDatasetTypeBandByIds(String[] ids)
    {
        return datasetTypeBandMapper.deleteDatasetTypeBandByIds(ids);
    }

    /**
     * 删除datasetband信息
     *
     * @param id datasetband主键
     * @return 结果
     */
    @Override
    public int deleteDatasetTypeBandById(String id)
    {
        return datasetTypeBandMapper.deleteDatasetTypeBandById(id);
    }

    @Override
    public DatasetTypeBand selectDatasetTypeBandTypeAndBandNo(String typeId, String bandNo) {
        return datasetTypeBandMapper.selectDatasetTypeBandTypeAndBandNo(typeId,bandNo);
    }
}
